package Controller.admin;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import Bean.SingerBean;
import Dao.adminDao;

public class searchSinger implements Controller {
	private adminDao dao;
	public void setDao(adminDao dao){
		this.dao = dao;
	}
	@Override
	public ModelAndView handleRequest(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		String singer = request.getParameter("singer");
		System.out.println("singer = "+singer);
		List<SingerBean>singerName = dao.searchSingerName(singer);
		
		
		ModelAndView mav = new ModelAndView();
		mav.setViewName("musicList");
		mav.addObject("singerName", singerName);
		return mav;
	}

}
